package com.ydc.ln.tutorial.j2se.ms;


/**
 * 引用相关测试
 * 
 * @author ydc
 * @date 上午10:09:30 2013-7-11
 */
public class RefernceTest {
    public static void main(String[] args) {
        RefernceTest rt = new RefernceTest();

        rt.first();
    }

    public void first() {
        int i = 5;
        Value v = new Value();
        v.i = 25;
        second(v, i);
        System.out.println(v.i);
    }

    public void second(Value v, int i) {
        i = 0;
        v.i = 20;
        Value v2 = new Value();
        v = v2;
        System.out.print("Value.i: " + v.i + "\t");
    }
}


class Value {
    int i = 15;
}
